package cn.edu.neusoft.yyd208.foodorder.model;

import cn.edu.neusoft.yyd208.foodorder.bean.CollectBean;
import cn.edu.neusoft.yyd208.foodorder.bean.RegisterBean;
import cn.edu.neusoft.yyd208.foodorder.iface.CollectIface;
import cn.edu.neusoft.yyd208.foodorder.listener.TListener;
import cn.edu.neusoft.yyd208.foodorder.service.Service;
import retrofit2.Call;
import retrofit2.Retrofit;



public class CollectCatModel extends RetrofitBaseModel implements CollectIface{
    private Service service;
    private Retrofit retrofit;
    public CollectCatModel(){
        retrofit=getRetrofit();
        service=getService();
    }

    @Override
    public void judge(String user_id, String shop_food_id, String flag,final TListener<CollectBean> listener) {
        Call<CollectBean> call=service.judge(user_id,shop_food_id,flag);
        callenqueue(call,listener);
    }

    @Override
    public void collect(String user_id, String food_id, TListener<RegisterBean> listener) {
       Call<RegisterBean> call=service.collectfood(user_id,food_id);
        callenqueue(call,listener);
    }
}
